Python: Run length encoding

welcome to shbcf.ru